<?php
	getHeader();
	if (isset($_SESSION['authPassed']))
	{
?>

		<span>我的收件箱</span>
		<a href='?p=editMessage'>给某人发送信息</a>
		<ul>
<?php 
			$message = userProf::getUserMessageByUsername($_SESSION['userName']);
			if ($message == 'NO')
			{
?>
				<span>你暂无私信.</span>
<?php
			}
			else
			{
				while ($arr = mysql_fetch_array($message))
				{
?>
					<li>
						<span><?php echo $arr['messageTitle']; //私信标题?></span><br />
						<span><?php echo $arr['messageFrom']; //私信发送人?></span><br />
						<span><?php echo date('Y年m月d日 H:i:s',$arr['messageTime']); //私信发送时间?></span><br />
						<span><?php echo $arr['messageContent']; //私信内容?></span><br />
					</li>
<?php
				}
			}
?>
		</ul>
<?php
	}
	else
	{
?>
		<span>你当前未登录, 不能查看私信.</span>
<?php
	}
	getPanel();
	getFooter();
?>